package cn.hl.enums;

import lombok.Getter;

@Getter
public enum  GlobalExceptionCode {
    SUCCESS("成功","0"),
    FAIL("失败","-1"),
    PARAM_NOT_ERROR("参数不能为空","1001"),
    SERVICE_DEMOTE_ERROR("熔断触发，服务降级，请稍后重试","1002"),
    OUT_OF_STOCK_ERROR("库存不足","2001"),
    REDUCE_STOCK_ERROR("出库失败","2002"),
    OUT_OF_BALANCE_ERROR("余额不足","3001"),

    APPLY_PURCHASE_ERROR("采购失败","4001"),
    AUDIT_ERROR("审核失败","4002");

    private String message;

    private String code;

    GlobalExceptionCode(String message, String code) {
        this.message = message;
        this.code = code;
    }
}

